Skip to content

refactor: set controller pattern to bottom sheet#463

Open
tvillega wants to merge 18 commits intoeddyizm:developmentfrom
tvillega:refactor-set-controller-pattern-to-bottom-sheet
Open

refactor: set controller pattern to bottom sheet#463
tvillega wants to merge 18 commits intoeddyizm:developmentfrom
tvillega:refactor-set-controller-pattern-to-bottom-sheet

Conversation

@tvillega
Copy link
Contributor

Depends on #460, see its description for context.

Up to this point, the navigation and the bottom sheet (the music player) have been mostly detached from the MainActivity, using now setters/getters and not global variables to interact with them.

The legacy code still interacts directly with MainActivity, but the functions are wrappers that communicate directly with the controllers. The pending functions mix the navigation with the bottom sheet so I wasn't able to wrap them properly.

I need to figure out how to make the controllers talk directly with each other, right now they use the global variables of MainActivity to achieve it.

The app keeps working normally and the legibility of the code has improved dramatically.

In order to add a toolbar with a back button in settings I needed to extend from a fragment
so I converted SettingsFragment into a fragment and created SettingsContainerFragment,
the latter is injected as a child of SettingsFragment inside a FrameLayout.

Since SettingsContainerFragment extends from PreferenceFragmentCompat, this allows
to swap it for other and, in the bigger picture, allow an arbitrary organization.
Hide bottom navigation bar on portrait and unlock drawer on portrait
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant